#include <iostream>
#include <set>
using namespace std;

int main()
{
    int n,m;
    cin>>n>>m;
    set<int>A;
    for (int i=0;i<n;i++)
    {
        int r;
        cin>>r;
        A.insert(r);
    }
    for (int i=0;i<m;i++)
    {
        int r;
        cin>>r;
        if (A.find(r)!=A.end())
            A.erase(r);
    }
    if (A.empty())
    {
        cout<<0;
        return 0;
    }
    for (auto it=A.begin();it!=A.end();it++)
    {
        if (it==A.begin())
            cout<<*it;
        else
            cout<<" "<<*it;
    }
}